<?php

namespace Apps\AppApi\Method\Common;


use Apps\AppApi\Method\BaseMethod;
use Apps\Common\Models\SysOpenCity;

/**
 * 开通城市列表
 * @package Apps\AppApi\Method\Common
 */
class OpenCityList extends BaseMethod
{
    public function run()
    {
        $data = SysOpenCity::query()
            ->columns(['city_code code', 'city_name name'])
            ->where('city_state = 1')
            ->orderBy('city_order DESC, city_id ASC')
            ->execute()
            ->toArray();
        $this->setResult($data);
    }
}